<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="design/styly.jsp" />
<title>Kontaktní osoby dodavatele ${dod}</title>
</head>
<body><jsp:include page="design/hlavicka.jsp" />
<div id="menu">
<p><a href="managerHome" >Díly</a>
<a href="managerDodavatele">Dodavatelé</a>
<em class="right">Je spuštěn managerský mod !</em>
</p>
</div>


<h1>Kontaktní osoby dodavatele ${dod}</h1>
<table class="tablesorter">
	<c:forEach var="osoba" items="${kontakty}">
		<tr><td>Jméno: ${osoba.titul} ${osoba.jmeno} ${osoba.prijmeni}</td><td>Tel: ${osoba.telefon}</td><td>Fax: ${osoba.fax}</td><td>Email: ${osoba.email}</td>
		<td><a href="kontaktyDodUpravit?id=${osoba.id}&idDod=${idDod}">Upravit</a></td><td><a href="odstranKontakt?id=${osoba.id}&idDod=${idDod}" onclick="return confirm('Chcete doopravdy smazat tento kontakt? Smazání je nenávratné.');">Odstranit</a></td></tr>
	</c:forEach>
</table>

<h1>Upravit kontaktní osobu</h1>

<form:form commandName="konForm" action="kontaktyDodUpravitAkce">
 
        <form:label path="titul">Titul</form:label><br />
        <form:input path="titul" /> <br />
        <form:label path="jmeno">Jméno</form:label><br />
        <form:input path="jmeno" />
        <form:errors path="jmeno" cssClass="error" /><br />
        <form:label path="prijmeni">Příjmení</form:label><br />
        <form:input path="prijmeni" />
        <form:errors path="prijmeni" cssClass="error" /><br />
        <form:label path="telefon">Telefon</form:label><br />
        <form:input path="telefon" /> 
        <form:errors path="telefon" cssClass="error" /><br />
        <form:label path="fax">Fax</form:label><br />
        <form:input path="fax" /><br />
        <form:label path="email">Email</form:label><br />
        <form:input path="email" /><br />
        <form:hidden path="idDod"/>
        <form:hidden path="id"/>
        
      
        <input type="submit" value="Upravit kontaktní osobu"/>
 
</form:form>


</body>
</html>